<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Twitter_crawl extends CI_Controller {

	/**
	* __construct 
	*
	* @access public
	* @return string $mixed
	*/
	public function __construct() {
        parent::__construct();
		ini_set("display_errors","on");
		error_reporting(E_ALL & ~E_NOTICE);
		set_time_limit(0);
		
		$this->load->library('error_code_library');
	}

	/**
	* crawl_keyword_from_html
	*
	* @access public
	* @return string $mixed
	*/
	public function crawl_keyword_from_html($page = 1) {
		
		header("Content-type:text/html; charset=utf-8");
		
		$_POST['word'] = 'microsoft';
		$_POST['page'] = $page;
		$_POST['platform'] = 'twitter';

		$this->load->database();
        $this->load->library('crawl_abstract');
        $this->load->library('crawl_keyword_library');
	    $this->load->library('Crawl_twitter_keyword_from_html_library');

	    $crawl_result = $this->crawl_twitter_keyword_from_html_library->crawl(FALSE);
	    echo "<pre>";
		print_r($crawl_result);
		echo "</pre>";
	}
}
